<?php
	ob_start();
	session_start();
	require("librarys/funcs/Manager.php");
	require("librarys/funcs/Utils.php");

	$conn = new Connection();
	$util = new Utils();
	$id   = $_GET['id'];

	$table = 'product';

	$record = $conn->get_all_data($table, $id);
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>

    <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
Remove this if you use the .htaccess -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>

    <title><?=$record['title']  ?> - Vnaloha Shop</title>
    <meta name="description" content="<?=$record['title']  ?> - Vnaloha Shop"/>
    <meta name="keyword" content="<?=$record['title']  ?> - Vnaloha Shop"/>
    <meta name="author" content="hieudoan"/>
    <base href="<?=$conn->BASE_URL  ?>"/>

	<?php include_once 'gg.php' ?>
</head>

<body>
<? include_once 'nav.php' ?>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span2">
			<? include_once 'menu.php' ?>
        </div>
        <div class="span10">
            <div class="page-header">
                <h3>
					<?=$record['title']  ?>
                </h3>
            </div>
            <div class="row-fluid">
                <div class="span4">
                    <a class="thumbnail" title="<?=$record['title']  ?>">
                        <img alt="<?=$record['title']  ?>" src="<?=$record['url_image']  ?>"/>
                    </a>
                </div>
                <div class="span8">
                    <table class="table">
                        <thead>
                        <tr>
                            <th colspan="2">
                                <h3>Thông tin sản phẩm</h3>
                            </th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td width="50">
                                <strong>Giá</strong>
                            </td>
                            <td>
                                <h3><?=$util->formatMoney($record['price'])  ?>  VNĐ</h3>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <strong>Mô tả</strong>
                            </td>
                            <td>
								<?=html_entity_decode($record['description']) ?>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <button onclick="" tabindex="<?=$record['id']  ?>" class="btn btn-primary">Đặt hàng
                                </button>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="row-fluid">
                <div class="span12">
                    <div class="page-header">
                        <h4>Thông tin chi tiết</h4>
                    </div>
                    <div>
						<?=$record['content']?>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
